import React from 'react';
import CommonPage from '@/components/page/CommonPage';
const daoName = 'ShCompClieQygm';
const importName = 'ShCompClieQygm';
const columns: API.Column[] = [
  {
    title: '数据日期',
    width: 120,
    sorter: true,
    dataIndex: 'DRYF',
    key: 'DRYF',
    dispaly: true,
    filter: true,
    export: false,
  },
  {
    title: '组织机构代码',
    dataIndex: 'ENCD',
    key: 'ENCD',
    width: 100,
    sorter: true,
    dispaly: true,
    filter: true,
    export: true,
  },
  {
    title: '客户名称',
    dataIndex: 'CUNM',
    key: 'CUNM',
    width: 250,
    sorter: true,
    dispaly: true,
    filter: true,
    export: true,
  },
  {
    title: '企业规模',
    width: 120,
    sorter: true,
    dataIndex: 'QYGM',
    key: 'QYGM',
    dispaly: true,
    filter: true,
    export: true,
  },
];
const controls: API.Control[] = [
  {
    name: 'DRYF',
    rules: [
      { required: true, message: '不能为空' },
      { max: 6, min: 6, message: '长度不能小于6，大于6' },
    ],
    type: 'text',
    label: '数据日期',
    grid: 12 / 24,
    placeholder: '按照YYYYMM格式填入，如201801',
  },
  {
    name: 'ENCD',
    rules: [{ required: true, message: '不能为空' }],
    type: 'text',
    label: '组织机构号',
    grid: 12 / 24,
  },
  {
    name: 'CUNM',
    rules: [{ required: true, message: '不能为空' }],
    type: 'text',
    label: '客户名称',
    grid: 12 / 24,
  },
  {
    name: 'QYGM',
    rules: [{ required: true, message: '不能为空' }],
    type: 'text',
    label: '企业规模',
    grid: 12 / 24,
  },
];

const ShCompClieQygmForm: React.FC = () => {
  return (
    <CommonPage
      daoName={daoName}
      columns={columns}
      controls={controls}
      title="对公企业规模维护"
      importName={importName}
      importControls={controls}
      importMode="DeleteAfterInsert"
      importParamNames={['DRYF']}
      importTemplateName="对公企业规模维护"
      initSorter={{ FieldName: 'DRYF', Direction: 'DESC' }}
    />
  );
};

export default ShCompClieQygmForm;
